Carbon


GetSoundPreference

Header: Sound.h Carbon status: Supported

Retrieves a block of preferences data you previously saved by calling SetSoundPreference. Intended for use only by sound components.

OSErr GetSoundPreference (
    OSType theType, 
    Str255 name, 
    Handle settings
);
Parameter descriptions
theType

The resource type of the preferences resource.

name

The resource name of the preferences resource.

settings

A handle to the data in the preferences resource.

function result

A result code.

DISCUSSION

The GetSoundPreference function retrieves the block of preferences data you previously stored in a resource by calling the SetSoundPreference function. It is the responsibility of your component to allocate the block of data referenced by the settings handle. The Sound Manager resizes the handle (if necessary) and fills it with data from the resource with the specified type and name. Your sound component should dispose of the handle once it’s finished reading the data from it. You can determine the size of the handle returned by the Sound Manager by calling the Memory Manager’s GetHandleSize function.

VERSION NOTES

The GetSoundPreference function is available only in versions 3.0 and later of the Sound Manager.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)